home *** CD-ROM | disk | FTP | other *** search
/ Geek Games #12 / GEGA012.iso / Jogos de Azar / blackjack1.swf / scripts / frame_15 / DoAction.as
Text File  |  2006-01-17  |  2KB  |  95 lines

  1. function Player_score_start(ps1)
  2. {
  3.    set("Pcard" + i,ps1);
  4.    i++;
  5.    Pvalue = Pcard0 + Pcard1 + Pcard2 + Pcard3 + Pcard4 + Pcard5 + Pcard6;
  6.    Pace = 0;
  7.    if(Pcard0 == 11)
  8.    {
  9.       Pace++;
  10.    }
  11.    if(Pcard1 == 11)
  12.    {
  13.       Pace++;
  14.    }
  15.    if(Pcard2 == 11)
  16.    {
  17.       Pace++;
  18.    }
  19.    if(Pcard3 == 11)
  20.    {
  21.       Pace++;
  22.    }
  23.    if(Pcard4 == 11)
  24.    {
  25.       Pace++;
  26.    }
  27.    if(Pcard5 == 11)
  28.    {
  29.       Pace++;
  30.    }
  31.    if(Pcard6 == 11)
  32.    {
  33.       Pace++;
  34.    }
  35. }
  36. function Player_score_finish()
  37. {
  38.    Pvalue = Pcard0 + Pcard1 + Pcard2 + Pcard3 + Pcard4 + Pcard5 + Pcard6;
  39.    if(Pace >= 1)
  40.    {
  41.       _root.scorePlayer.gotoAndStop("11");
  42.       Pmaster = 0;
  43.       if(Pace == 1)
  44.       {
  45.          Pmaster1 = Pvalue - 10;
  46.          Pmaster2 = Pvalue;
  47.          _root.scorePlayer.score1a = Pmaster1;
  48.          _root.scorePlayer.score1b = Pmaster2;
  49.       }
  50.       if(Pace == 2)
  51.       {
  52.          Pmaster1 = Pvalue - 20;
  53.          Pmaster2 = Pvalue;
  54.          _root.scorePlayer.score1a = Pmaster1;
  55.          _root.scorePlayer.score1b = Pmaster2;
  56.       }
  57.       if(Pace == 3)
  58.       {
  59.          Pmaster1 = Pvalue - 30;
  60.          Pmaster2 = Pvalue;
  61.          _root.scorePlayer.score1a = Pmaster1;
  62.          _root.scorePlayer.score1b = Pmaster2;
  63.       }
  64.       if(Pace == 4)
  65.       {
  66.          Pmaster1 = Pvalue - 40;
  67.          Pmaster2 = Pvalue;
  68.          _root.scorePlayer.score1a = Pmaster1;
  69.          _root.scorePlayer.score1b = Pmaster2;
  70.       }
  71.    }
  72.    if(0 >= Pace)
  73.    {
  74.       Pmaster = Pvalue;
  75.       _root.scorePlayer.score1 = Pmaster;
  76.    }
  77.    if(Pmaster == 0)
  78.    {
  79.       if(Pmaster2 >= 22)
  80.       {
  81.          Ptotal = Pmaster1;
  82.       }
  83.       if(21 >= Pmaster2)
  84.       {
  85.          Ptotal = Pmaster2;
  86.       }
  87.    }
  88.    else
  89.    {
  90.       Ptotal = Pmaster;
  91.    }
  92.    guessWhoPlayer();
  93. }
  94. i = 0;
  95.